<template>
	<view class="j-sub">
		<view class="j-sub-icon"><u-icon name="checkmark" color="#FFFFFF" size="50"></u-icon></view>
		<view class="j-sub-title">
			<text v-if="type == 1">充值</text>
			<text v-if="type == 1">提现</text>
			申请已提交，请等待审核
		</view>
		<view class="j-sub-price">
			<text v-if="type == 1">充值</text>
			<text v-if="type == 1">提现</text>
			金额￥{{ price }}
		</view>
		<u-button class="j-sub-btn" shape="circle" hover-class="none" @click="difference">完成</u-button>
	</view>
</template>

<script>
export default {
	data() {
		return {
			type: 1,
			price: '0.00'
		};
	},
	onLoad(e) {
		this.type = e.type;
		this.price = e.price;
	},
	methods:{
		difference(){
			if(this.type == 1){
				this.toRechargeRecord();
			}
			if(this.type == 2){
				this.toWithdrawalRecord();
			}
		},
		// 跳转充值记录
		toRechargeRecord(){
			uni.redirectTo({
				url:'./recharge-record'
			})
		},
		// 跳转提现记录
		toWithdrawalRecord(){
			uni.redirectTo({
				url:'./withdrawal-record'
			})
		}
	}
};
</script>

<style scoped lang="scss">
.j-sub {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin-top: 150rpx;

	.j-sub-icon {
		width: 92rpx;
		height: 92rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 50%;
		background: linear-gradient(180deg, rgba(248, 195, 5, 1), rgba(254, 166, 2, 1));
	}

	.j-sub-title {
		margin-top: 30rpx;
	}

	.j-sub-price {
		margin-top: 10rpx;
	}

	.j-sub-btn {
		color: #000000;
		width: 500rpx;
		margin-top: 50rpx;
		background: linear-gradient(90deg, rgba(248, 195, 5, 1), rgba(254, 166, 2, 1));

		&::after {
			border: 0;
		}
	}
}
</style>
